<!doctype html>



  


<html class="theme-next pisces use-motion">
<head>
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-PBHRK7');</script>
<!-- End Google Tag Manager -->
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>



<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />












  
  
  <link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />




  
  
  
  

  
    
    
  

  

  

  

  

  
    
    
    <link href="//fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">
  






<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.4.0" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=5.0.2" rel="stylesheet" type="text/css" />


  <meta name="keywords" content="工具," />








  <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico?v=5.0.2" />






<meta name="description" content="背景经过一个比较完整的项目周期，大家工作忙活过后都会做总结以及思考，此外我们更需要做的是分(zhuang)享(bi)！！！然而在分享的时候，我们都会考虑如何做一个好的PPT，大概会有以下的需求：  1.希望PPT能灵活的设置动画，出现的顺序；2.希望最好能全屏播放；3.希望最好有移动设备能控制PPT 前进后退；4.分享后能生成PDF，能放在各种地方保存起来。  选型因此我们选择了使用 “nodeP">
<meta name="keywords" content="工具">
<meta property="og:type" content="article">
<meta property="og:title" content="如何做一次前端分享">
<meta property="og:url" content="http://wurh.github.io/2016/02/20/20160220/index.html">
<meta property="og:site_name" content="华Ing&#39;s blog">
<meta property="og:description" content="背景经过一个比较完整的项目周期，大家工作忙活过后都会做总结以及思考，此外我们更需要做的是分(zhuang)享(bi)！！！然而在分享的时候，我们都会考虑如何做一个好的PPT，大概会有以下的需求：  1.希望PPT能灵活的设置动画，出现的顺序；2.希望最好能全屏播放；3.希望最好有移动设备能控制PPT 前进后退；4.分享后能生成PDF，能放在各种地方保存起来。  选型因此我们选择了使用 “nodeP">
<meta property="og:locale" content="en">
<meta property="og:updated_time" content="2019-07-12T06:10:38.184Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="如何做一次前端分享">
<meta name="twitter:description" content="背景经过一个比较完整的项目周期，大家工作忙活过后都会做总结以及思考，此外我们更需要做的是分(zhuang)享(bi)！！！然而在分享的时候，我们都会考虑如何做一个好的PPT，大概会有以下的需求：  1.希望PPT能灵活的设置动画，出现的顺序；2.希望最好能全屏播放；3.希望最好有移动设备能控制PPT 前进后退；4.分享后能生成PDF，能放在各种地方保存起来。  选型因此我们选择了使用 “nodeP">



<script type="text/javascript" id="hexo.configuration">
  var NexT = window.NexT || {};
  var CONFIG = {
    scheme: 'Pisces',
    sidebar: {"position":"left","display":"post"},
    fancybox: true,
    motion: true,
    duoshuo: {
      userId: '0',
      author: 'Author'
    }
  };
</script>




  <link rel="canonical" href="http://wurh.github.io/2016/02/20/20160220/"/>


  <title> 如何做一次前端分享 | 华Ing's blog </title>
</head>

<body itemscope itemtype="//schema.org/WebPage" lang="en">
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-PBHRK7"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->

  










  
  
    
  

<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-69412379-1', 'auto');
  ga('send', 'pageview');

</script>

  <script>
  var _hmt = _hmt || [];
  (function() {
    var hm = document.createElement("script");
    hm.src = "https://hm.baidu.com/hm.js?b3ddfb8655d8b77429e04c7a4d5bcbc1";
    var s = document.getElementsByTagName("script")[0];
    s.parentNode.insertBefore(hm, s);
  })();
  </script>


  <div class="container one-collumn sidebar-position-left page-post-detail ">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="//schema.org/WPHeader">
      <div class="header-inner"><div class="site-meta ">
  

  <div class="custom-logo-site-title">
    <a href="/"  class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <span class="site-title">华Ing's blog</span>
      <span class="logo-line-after"><i></i></span>
    </a>
  </div>
  <p class="site-subtitle">harder and harder</p>
</div>

<div class="site-nav-toggle">
  <button>
    <span class="btn-bar"></span>
    <span class="btn-bar"></span>
    <span class="btn-bar"></span>
  </button>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
            Home
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/categories" rel="section">
            
            Categories
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives" rel="section">
            
            Archives
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/tags" rel="section">
            
            Tags
          </a>
        </li>
      

      
    </ul>
  

  
</nav>

 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  
  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="//schema.org/Article">

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
            
            
              
                如何做一次前端分享
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">
            <span class="post-meta-item-icon">
              <i class="fa fa-calendar-o"></i>
            </span>
            <span class="post-meta-item-text">Posted on</span>
            <time itemprop="dateCreated" datetime="2016-02-20T21:08:41+08:00" content="2016-02-20">
              2016-02-20
            </time>
          </span>

          
            <span class="post-category" >
              &nbsp; | &nbsp;
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              <span class="post-meta-item-text">In</span>
              
                <span itemprop="about" itemscope itemtype="https://schema.org/Thing">
                  <a href="/categories/经验总结/" itemprop="url" rel="index">
                    <span itemprop="name">经验总结</span>
                  </a>
                </span>

                
                

              
            </span>
          

          
            
              <span class="post-comments-count">
                &nbsp; | &nbsp;
                <a href="/2016/02/20/20160220/#comments" itemprop="discussionUrl">
                  <span class="post-comments-count ds-thread-count" data-thread-key="2016/02/20/20160220/" itemprop="commentsCount"></span>
                </a>
              </span>
            
          

          

          
          

          
        </div>
      </header>
    


    <div class="post-body" itemprop="articleBody">

      
      

      
        <h1 id="背景"><a href="#背景" class="headerlink" title="背景"></a>背景</h1><p>经过一个比较完整的项目周期，大家工作忙活过后都会做总结以及思考，此外我们更需要做的是分(zhuang)享(bi)！！！<br>然而在分享的时候，我们都会考虑如何做一个好的PPT，大概会有以下的需求：</p>
<blockquote>
<p>1.希望PPT能灵活的设置动画，出现的顺序；<br>2.希望最好能全屏播放；<br>3.希望最好有移动设备能控制PPT 前进后退；<br>4.分享后能生成PDF，能放在各种地方保存起来。</p>
</blockquote>
<h1 id="选型"><a href="#选型" class="headerlink" title="选型"></a>选型</h1><p>因此我们选择了使用 “nodePPT” ！</p>
<h1 id="安装"><a href="#安装" class="headerlink" title="安装"></a>安装</h1><blockquote>
<p>npm install nodeppt -g</p>
</blockquote>
<h1 id="使用"><a href="#使用" class="headerlink" title="使用"></a>使用</h1><blockquote>
<p>#获取帮助<br>nodeppt start -h</p>
<p>#绑定端口<br>nodeppt start -p</p>
</blockquote>
<p>#theme 自定义</p>
<p>感觉默认的模板不符合新意？可以支持自定义模板，查看theme.moon</p>
<p>自定义后的模板路径在markdown的设置里填写：</p>
<blockquote>
<p>title: 这是演讲的题目<br>speaker: 演讲者名字<br>url: 可以设置链接<br>transition: 转场效果，例如：zoomin/cards/slide<br>files: /css/theme.moon.css，尾部的文件<br>theme: moon //皮肤<br>highlightStyle: monokai_sublime //hljs的样式<br>headFiles: //头部的文件<br>usemathjax: //如果为yes，则引入mathjax，默认不建议开启，导出文件太多<br>date: 2015年12月20日<br>另外有：colors-moon-blue-dark-green-light 共六套自带皮肤可供选择</p>
</blockquote>
<blockquote>
<p>theme: moon<br>or url?theme=moon</p>
</blockquote>
<h1 id="编写语法"><a href="#编写语法" class="headerlink" title="编写语法"></a>编写语法</h1><ul>
<li>支持markdown语法编写</li>
<li>支持html语法编写</li>
<li>支持iframe嵌入页面编写</li>
</ul>
<h1 id="转场动画"><a href="#转场动画" class="headerlink" title="转场动画"></a>转场动画</h1><blockquote>
<p>[slide data-on-build=”globalCallbackName”]</p>
</blockquote>
<h1 id="打印-导出ppt"><a href="#打印-导出ppt" class="headerlink" title="打印/导出ppt"></a>打印/导出ppt</h1><h3 id="PDF版本"><a href="#PDF版本" class="headerlink" title="PDF版本"></a>PDF版本</h3><p>这么高端大气上档次的ppt，怎么能不导出分享给大家呢？？</p>
<p>使用url?print=1访问页面，然后选择chrome的系统打印即可</p>
<h3 id="html版"><a href="#html版" class="headerlink" title="html版"></a>html版</h3><blockquote>
<p># 获取generate帮助<br>nodeppt generate -h</p>
<p># 使用generate命令<br>nodeppt generate filepath</p>
<p># 导出全部，包括nodeppt的js、img和css文件夹<br># 默认导出在publish文件夹<br>nodeppt generate ./ppts/demo.md -a</p>
<p># 指定导出文件夹<br>nodeppt generate ./ppts/demo.md output/path -a</p>
<p>导出目录下所有ppt，并且生成ppt list首页：<br>nodeppt path output/path -a</p>
</blockquote>
<h1 id="Demo"><a href="#Demo" class="headerlink" title="Demo"></a>Demo</h1><p><a href="https://github.com/wurh/mynodeppt" title="rahul的PPT分享" target="_blank" rel="noopener">rahul的PPT分享</a><br><a href="http://qdemo.sinaapp.com/" title="在线demo" target="_blank" rel="noopener">在线demo</a></p>
<h1 id="鸣谢"><a href="#鸣谢" class="headerlink" title="鸣谢"></a>鸣谢</h1><p><a href="http://tympanus.net/Development/ItemTransitions/index2.html" target="_blank" rel="noopener">http://tympanus.net/Development/ItemTransitions/index2.html</a><br><a href="http://tympanus.net/Development/PageTransitions/" target="_blank" rel="noopener">http://tympanus.net/Development/PageTransitions/</a><br><a href="https://github.com/daneden/animate.css" target="_blank" rel="noopener">https://github.com/daneden/animate.css</a></p>

      
    </div>

    <div>
      
        

      
    </div>

    <div>
      
        
  <div style="padding: 10px 0; margin: 20px auto; width: 90%; text-align: center;">
    <div>坚持原创技术分享，您的支持将鼓励我继续创作！</div>
    <button id="rewardButton" disable="enable" onclick="var qr = document.getElementById('QR'); if (qr.style.display === 'none') {qr.style.display='block';} else {qr.style.display='none'}">
      <span>赏</span>
    </button>
    <div id="QR" style="display: none;">
      
        <div id="wechat" style="display: inline-block">
          <img id="wechat_qr" src="https://wurh.github.io/images/others/weixinshou.png" alt="华Ing WeChat Pay"/>
          <p>微信打赏</p>
        </div>
      
      
        <div id="alipay" style="display: inline-block">
          <img id="alipay_qr" src="https://wurh.github.io/images/others/alifu.png" alt="华Ing Alipay"/>
          <p>支付宝打赏</p>
        </div>
      
    </div>
  </div>


      
    </div>

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/工具/" rel="tag">#工具</a>
          
        </div>
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2015/07/15/20150715/" rel="next" title="深JS大会参与感受">
                <i class="fa fa-chevron-left"></i> 深JS大会参与感受
              </a>
            
          </div>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2016/05/20/20160520/" rel="prev" title="Play Framework 1.2.x 与 Intellij IDE 集成方案">
                Play Framework 1.2.x 与 Intellij IDE 集成方案 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </article>



    <div class="post-spread">
      
        
<script>
  with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='//bdimg.share.baidu.com/static/api/js/share.js?cdnversion='+~(-new Date()/36e5)];
</script>

      
    </div>
  </div>


          </div>
          


          
  <div class="comments" id="comments">
    
      <div class="ds-thread" data-thread-key="2016/02/20/20160220/"
           data-title="如何做一次前端分享" data-url="http://wurh.github.io/2016/02/20/20160220/">
      </div>
    
  </div>


        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap" >
            Table of Contents
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview">
            Overview
          </li>
        </ul>
      

      <section class="site-overview sidebar-panel ">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="//schema.org/Person">
          <img class="site-author-image" itemprop="image"
               src="https://wurh.github.io/images/avatar/logo.jpg?123456"
               alt="华Ing" />
          <p class="site-author-name" itemprop="name">华Ing</p>
          <p class="site-description motion-element" itemprop="description">harder and harder</p>
        </div>
        <nav class="site-state motion-element">
          <div class="site-state-item site-state-posts">
            <a href="/archives">
              <span class="site-state-item-count">56</span>
              <span class="site-state-item-name">posts</span>
            </a>
          </div>

          
            <div class="site-state-item site-state-categories">
              <a href="/categories">
                <span class="site-state-item-count">11</span>
                <span class="site-state-item-name">categories</span>
              </a>
            </div>
          

          
            <div class="site-state-item site-state-tags">
              <a href="/tags">
                <span class="site-state-item-count">15</span>
                <span class="site-state-item-name">tags</span>
              </a>
            </div>
          

        </nav>

        

        <div class="links-of-author motion-element">
          
            
              <span class="links-of-author-item">
                <a href="https://github.com/wurh" target="_blank" title="GitHub">
                  
                    <i class="fa fa-fw fa-github"></i>
                  
                  GitHub
                </a>
              </span>
            
              <span class="links-of-author-item">
                <a href="http://weibo.com/1674582564/profile?topnav=1&wvr=6" target="_blank" title="微博">
                  
                    <i class="fa fa-fw fa-globe"></i>
                  
                  微博
                </a>
              </span>
            
              <span class="links-of-author-item">
                <a href="https://www.zhihu.com/people/wu-rong-hua-56" target="_blank" title="知乎">
                  
                    <i class="fa fa-fw fa-globe"></i>
                  
                  知乎
                </a>
              </span>
            
          
        </div>

        
        

        
        
          <div class="links-of-blogroll motion-element links-of-blogroll-inline">
            <div class="links-of-blogroll-title">
              <i class="fa  fa-fw fa-globe"></i>
              Links
            </div>
            <ul class="links-of-blogroll-list">
              
                <li class="links-of-blogroll-item">
                  <a href="http://fsiaonma.github.io/" title="sam博客" target="_blank">sam博客</a>
                </li>
              
                <li class="links-of-blogroll-item">
                  <a href="http://shenjoel.github.io/" title="joel博客" target="_blank">joel博客</a>
                </li>
              
                <li class="links-of-blogroll-item">
                  <a href="http://firewood1122.github.io" title="firewood博客" target="_blank">firewood博客</a>
                </li>
              
                <li class="links-of-blogroll-item">
                  <a href="http://reqianduan.com" title="热前端" target="_blank">热前端</a>
                </li>
              
                <li class="links-of-blogroll-item">
                  <a href="http://opentutorial.info/" title="黄超博客" target="_blank">黄超博客</a>
                </li>
              
            </ul>
          </div>
        

      </section>

      
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">
            
              
            
            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#背景"><span class="nav-number">1.</span> <span class="nav-text">背景</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#选型"><span class="nav-number">2.</span> <span class="nav-text">选型</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#安装"><span class="nav-number">3.</span> <span class="nav-text">安装</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#使用"><span class="nav-number">4.</span> <span class="nav-text">使用</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#编写语法"><span class="nav-number">5.</span> <span class="nav-text">编写语法</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#转场动画"><span class="nav-number">6.</span> <span class="nav-text">转场动画</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#打印-导出ppt"><span class="nav-number">7.</span> <span class="nav-text">打印/导出ppt</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#PDF版本"><span class="nav-number">7.0.1.</span> <span class="nav-text">PDF版本</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#html版"><span class="nav-number">7.0.2.</span> <span class="nav-text">html版</span></a></li></ol></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#Demo"><span class="nav-number">8.</span> <span class="nav-text">Demo</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#鸣谢"><span class="nav-number">9.</span> <span class="nav-text">鸣谢</span></a></li></ol></div>
            
          </div>
        </section>
      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright" >
  
  &copy;  2013 - 
  <span itemprop="copyrightYear">2019</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">华Ing</span>
</div>

<div class="powered-by">
  Powered by <a class="theme-link" href="https://hexo.io">Hexo</a>
</div>

<div class="theme-info">
  Theme -
  <a class="theme-link" href="https://github.com/iissnan/hexo-theme-next">
    NexT.Pisces
  </a>
</div>

        

        
      </div>
    </footer>

    <div class="back-to-top">
      <i class="fa fa-arrow-up"></i>
    </div>
  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  



  
  <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>

  
  <script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>

  
  <script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>

  
  <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>

  
  <script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.0.2"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.0.2"></script>



  
  


  <script type="text/javascript" src="/js/src/affix.js?v=5.0.2"></script>

  <script type="text/javascript" src="/js/src/schemes/pisces.js?v=5.0.2"></script>



  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=5.0.2"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.0.2"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.0.2"></script>



  

  
    
  

  <script type="text/javascript">
    var duoshuoQuery = {short_name:"wurh"};
    (function() {
      var ds = document.createElement('script');
      ds.type = 'text/javascript';ds.async = true;
      ds.id = 'duoshuo-script';
      ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js';
      ds.charset = 'UTF-8';
      (document.getElementsByTagName('head')[0]
      || document.getElementsByTagName('body')[0]).appendChild(ds);
    })();
  </script>

  
    
    <script src="/lib/ua-parser-js/dist/ua-parser.min.js?v=0.7.9"></script>
    <script src="/js/src/hook-duoshuo.js"></script>
  






  
  

  

  

  

  


</body>
</html>
